import Taro, { Component } from '@tarojs/taro'
import { View,Input,ScrollView } from '@tarojs/components'
import { getWindowHeight } from '../../utils/common'
import List from "./list/list";
import Menu from "./menu/menu";
import './sort.less'

class Sort extends Component {

  config = {
    navigationBarTitleText: '分类'
  }

  render () {
    const height = getWindowHeight(50);
    return (
      <View className='Sort'>
        <View className='sort_top_select'>
          <Input className='sort_input' placeholder='搜索您想要的商品' />
        </View>
        <View className='cate_menu'>
          <View className='menu_item'>
            <ScrollView
              scrollY
              style={{ height }}
              className='sort_scrollView'
            >
              <Menu />
            </ScrollView>
            <ScrollView
              scrollY
              style={{ height }}
              className='sort_scroll_list'
            >
              <List />
            </ScrollView>
          </View>
        </View>
      </View>
    )
  }
}

export default Sort
